 <form method="post" action="admins.php"  name="cat_form">
<article class="module width_full" id="cat_add">
    <header>
      <h3>套餐管理</h3>
    </header>
   
    <div class="module_content">
   
      <fieldset>
        <label>套餐名称</label>
        <input type="text" name="p_name">
      </fieldset>
      <fieldset >
        <strong class="title">套餐描述</strong>
        <textarea rows="12" name="p_desc" id="p_desc" style="height:200px"></textarea>
        <script>
         UE.getEditor('p_desc');
        </script>
      </fieldset>
    
      
      <fieldset style="width:48%; float:left;;margin-right: 3%;">
        <!-- to make two field float next to one another, adjust values accordingly -->
        <label>商品id（用,分割）</label>
        <input type="text" style="width:92%;" name="p_ids">
      </fieldset>
        
     <fieldset style="width:47%; float:left; margin-left: 1%;">
        <!-- to make two field float next to one another, adjust values accordingly -->
        <label>所属分类</label>
        <select style="width:92%;" name="f_id">
          <option value="">请选择</option>
          {{foreach from=$categories item=list key=key}}
          <option value="{{$list.cat_id}}">{{$list.cat_name}}</option>
          	 {{foreach from=$list.children item=s_list key=s_key}}
         	 <option value="{{$s_list.cat_id}}">┗{{$s_list.cat_name}}</option>
              {{foreach from=$s_list.children item=ss_list key=ss_key}}
         	 <option value="{{$ss_list.cat_id}}">&nbsp;&nbsp;&nbsp;┗{{$ss_list.cat_name}}</option>
          	 {{/foreach}}
          	{{/foreach}}
          {{/foreach}}
        
        </select>
      </fieldset>
        <fieldset style="width:48%; float:left;;margin-right: 3%;">
        <!-- to make two field float next to one another, adjust values accordingly -->
        <label>套餐价格</label>
        <input type="text" style="width:92%;" name="price">
      </fieldset>
        </fieldset>
        <fieldset style="width:47%; float:left;;margin-left: 1%;">
        <!-- to make two field float next to one another, adjust values accordingly -->
        <label>运费</label>
        <input type="text" style="width:92%;" name="shipping_fee">
      </fieldset>
      
      <div class="clear"></div>
    </div>
    <footer>
      <div class="submit_link">
        <select name="is_show">
          <option value="1">是否显示?</option>
          <option value="1">是</option>
          <option value="0">否</option>
        </select>
        <input type="hidden" name="act" value="{{$act}}"/>
        <input type="submit" value="发布" class="alt_btn" onclick=" return AD.articleCatAdd('#cat_add')">
       </div>
    </footer>
  </article>
  </form>
<script>
//文章分类
Admin.prototype.goodsPackageAdd = function(obj){
	var names = ['p_name','p_desc','p_ids','is_show','p_id'];
	
	var data = Main.dataValue(obj,names);
	if(data.cat_name)
	{
			
		$("form[name=cat_form]").submit();
		
	}
	else
	{
		alert("分类名称必须填写！");	
		return false;
	}
}
Admin.prototype.articleCatAddRes = function(res){
	if(res=='1')
	{
		alert("操作成功!");
		location.href = "articleCat";	
	}	
}
</script>